package view;

import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

/**
 * Creates menu entries.
 * 
 * @author wesleybrown
 *
 */
public class MenuItem {

	public static JMenu addJMenuItems(JMenu menu, String[] items, ActionListener listener)
	{
		for (String menuName : items)
		{
			JMenuItem i = new JMenuItem(menuName);
			i.addActionListener(listener);
			menu.add(i);
		}
		return menu;
	}
}
